Repository navigation
fix(shared): raise question card option length limit to 300 chars - #147
Conversation
Agent instructions still ask models to keep options concise (at most 120 characters), but models frequently overshoot by a handful of characters and silently fall back to plain blockquotes instead of interactive question cards. Raising the parser limit in parseQuestionQuote to 300 characters adds headroom while staying comfortably below the 4,000-character quote cap even with 8 options and a 500-character prompt.
PR SummaryLow Risk Overview On this fork, the four multi-iframe Reviewed by Cursor Bugbot for commit 511bb09. Bugbot is set up for automated code reviews on this repo. Configure here. |
Each srcdoc iframe in browserHistoryStore.browser.test.ts imports the module graph fresh from the Vite dev server; on ubuntu-24.04 GitHub runners the 3-iframe test takes ~12.5-16s and repeatedly trips Vitest's 15s default timeout, cascading into the following test. Give the four multi-iframe tests a 30s timeout and record the divergence in fork/README.md.
Summary
Question cards sometimes fell back to plain blockquotes when an agent wrote an option slightly longer than 120 characters (e.g., 123–132 characters), because
parseQuestionQuoteenforced the same hard 120-character cap as the prompt instructions and LLMs don't reliably count exact character lengths.What changes
packages/shared/src/questionCards.ts(parseQuestionQuote) from120to300(MAX_OPTION_LENGTH), while leavingQUESTION_CARD_INSTRUCTIONSunchanged so agents are still guided to write concise options.QuestionCardoptions already wrap cleanly ([overflow-wrap:anywhere]).packages/shared/src/questionCards.test.tsto cover accepting options up to 300 characters and rejecting options over 300 characters.apps/web/src/browserHistoryStore.browser.test.tsa 30s timeout (and documented the divergence infork/README.md) so loading 3srcdociframes onubuntu-24.04GitHub runners doesn't trip Vitest's 15s default timeout.Verification
vp test run packages/shared/src/questionCards.test.ts apps/server/src/orchestration-v2/openQuestions.test.ts(120/120 passed)vp test run apps/web/src/browserHistoryStore.browser.test.ts(10/10 passed)vp run fmt:check,vp lint --report-unused-disable-directives,vp run knip:check,vp run --filter @t3tools/shared typecheck